import { Injectable } from '@angular/core';
import { HttpClient } from '../../../providers/httpClient';
import { Config } from '../../../providers/config';

@Injectable()
export class FlowListService {
	constructor(
		public httpClient: HttpClient,
		public config: Config
	) { }

	/**
	 * [getFlowListData 获取文档列表]
	 * @param {[type]} params [参数：{"pageSize" :, "title":""}]
	 */
	getFlowListData(params) {
		let postBody = {
			"module": "OAServer",
			"method": "getFlowList",
			"params": {
				"pageSize": this.config.pageSize,
				"page": params.page,
				"loginId": "",
				"condition": params.condition
			}
		}
		return this.httpClient.post(postBody);
	}
}
